package com.mindai.esper.monitor.persistence.auto.model;

import java.util.ArrayList;
import java.util.List;

public class EsperMethodExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public EsperMethodExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameIsNull() {
            addCriterion("method_class_name is null");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameIsNotNull() {
            addCriterion("method_class_name is not null");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameEqualTo(String value) {
            addCriterion("method_class_name =", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameNotEqualTo(String value) {
            addCriterion("method_class_name <>", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameGreaterThan(String value) {
            addCriterion("method_class_name >", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameGreaterThanOrEqualTo(String value) {
            addCriterion("method_class_name >=", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameLessThan(String value) {
            addCriterion("method_class_name <", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameLessThanOrEqualTo(String value) {
            addCriterion("method_class_name <=", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameLike(String value) {
            addCriterion("method_class_name like", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameNotLike(String value) {
            addCriterion("method_class_name not like", value, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameIn(List<String> values) {
            addCriterion("method_class_name in", values, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameNotIn(List<String> values) {
            addCriterion("method_class_name not in", values, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameBetween(String value1, String value2) {
            addCriterion("method_class_name between", value1, value2, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameNotBetween(String value1, String value2) {
            addCriterion("method_class_name not between", value1, value2, "methodClassName");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeIsNull() {
            addCriterion("cache_reference_type is null");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeIsNotNull() {
            addCriterion("cache_reference_type is not null");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeEqualTo(String value) {
            addCriterion("cache_reference_type =", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeNotEqualTo(String value) {
            addCriterion("cache_reference_type <>", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeGreaterThan(String value) {
            addCriterion("cache_reference_type >", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeGreaterThanOrEqualTo(String value) {
            addCriterion("cache_reference_type >=", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeLessThan(String value) {
            addCriterion("cache_reference_type <", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeLessThanOrEqualTo(String value) {
            addCriterion("cache_reference_type <=", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeLike(String value) {
            addCriterion("cache_reference_type like", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeNotLike(String value) {
            addCriterion("cache_reference_type not like", value, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeIn(List<String> values) {
            addCriterion("cache_reference_type in", values, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeNotIn(List<String> values) {
            addCriterion("cache_reference_type not in", values, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeBetween(String value1, String value2) {
            addCriterion("cache_reference_type between", value1, value2, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeNotBetween(String value1, String value2) {
            addCriterion("cache_reference_type not between", value1, value2, "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeIsNull() {
            addCriterion("method_describe is null");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeIsNotNull() {
            addCriterion("method_describe is not null");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeEqualTo(String value) {
            addCriterion("method_describe =", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeNotEqualTo(String value) {
            addCriterion("method_describe <>", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeGreaterThan(String value) {
            addCriterion("method_describe >", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeGreaterThanOrEqualTo(String value) {
            addCriterion("method_describe >=", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeLessThan(String value) {
            addCriterion("method_describe <", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeLessThanOrEqualTo(String value) {
            addCriterion("method_describe <=", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeLike(String value) {
            addCriterion("method_describe like", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeNotLike(String value) {
            addCriterion("method_describe not like", value, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeIn(List<String> values) {
            addCriterion("method_describe in", values, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeNotIn(List<String> values) {
            addCriterion("method_describe not in", values, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeBetween(String value1, String value2) {
            addCriterion("method_describe between", value1, value2, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeNotBetween(String value1, String value2) {
            addCriterion("method_describe not between", value1, value2, "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsIsNull() {
            addCriterion("max_age_seconds is null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsIsNotNull() {
            addCriterion("max_age_seconds is not null");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsEqualTo(Integer value) {
            addCriterion("max_age_seconds =", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsNotEqualTo(Integer value) {
            addCriterion("max_age_seconds <>", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsGreaterThan(Integer value) {
            addCriterion("max_age_seconds >", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsGreaterThanOrEqualTo(Integer value) {
            addCriterion("max_age_seconds >=", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsLessThan(Integer value) {
            addCriterion("max_age_seconds <", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsLessThanOrEqualTo(Integer value) {
            addCriterion("max_age_seconds <=", value, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsIn(List<Integer> values) {
            addCriterion("max_age_seconds in", values, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsNotIn(List<Integer> values) {
            addCriterion("max_age_seconds not in", values, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsBetween(Integer value1, Integer value2) {
            addCriterion("max_age_seconds between", value1, value2, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andMaxAgeSecondsNotBetween(Integer value1, Integer value2) {
            addCriterion("max_age_seconds not between", value1, value2, "maxAgeSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsIsNull() {
            addCriterion("purge_interval_seconds is null");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsIsNotNull() {
            addCriterion("purge_interval_seconds is not null");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsEqualTo(Integer value) {
            addCriterion("purge_interval_seconds =", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsNotEqualTo(Integer value) {
            addCriterion("purge_interval_seconds <>", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsGreaterThan(Integer value) {
            addCriterion("purge_interval_seconds >", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsGreaterThanOrEqualTo(Integer value) {
            addCriterion("purge_interval_seconds >=", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsLessThan(Integer value) {
            addCriterion("purge_interval_seconds <", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsLessThanOrEqualTo(Integer value) {
            addCriterion("purge_interval_seconds <=", value, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsIn(List<Integer> values) {
            addCriterion("purge_interval_seconds in", values, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsNotIn(List<Integer> values) {
            addCriterion("purge_interval_seconds not in", values, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsBetween(Integer value1, Integer value2) {
            addCriterion("purge_interval_seconds between", value1, value2, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andPurgeIntervalSecondsNotBetween(Integer value1, Integer value2) {
            addCriterion("purge_interval_seconds not between", value1, value2, "purgeIntervalSeconds");
            return (Criteria) this;
        }

        public Criteria andCaIsNull() {
            addCriterion("ca is null");
            return (Criteria) this;
        }

        public Criteria andCaIsNotNull() {
            addCriterion("ca is not null");
            return (Criteria) this;
        }

        public Criteria andCaEqualTo(String value) {
            addCriterion("ca =", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaNotEqualTo(String value) {
            addCriterion("ca <>", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaGreaterThan(String value) {
            addCriterion("ca >", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaGreaterThanOrEqualTo(String value) {
            addCriterion("ca >=", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaLessThan(String value) {
            addCriterion("ca <", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaLessThanOrEqualTo(String value) {
            addCriterion("ca <=", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaLike(String value) {
            addCriterion("ca like", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaNotLike(String value) {
            addCriterion("ca not like", value, "ca");
            return (Criteria) this;
        }

        public Criteria andCaIn(List<String> values) {
            addCriterion("ca in", values, "ca");
            return (Criteria) this;
        }

        public Criteria andCaNotIn(List<String> values) {
            addCriterion("ca not in", values, "ca");
            return (Criteria) this;
        }

        public Criteria andCaBetween(String value1, String value2) {
            addCriterion("ca between", value1, value2, "ca");
            return (Criteria) this;
        }

        public Criteria andCaNotBetween(String value1, String value2) {
            addCriterion("ca not between", value1, value2, "ca");
            return (Criteria) this;
        }

        public Criteria andMethodClassNameLikeInsensitive(String value) {
            addCriterion("upper(method_class_name) like", value.toUpperCase(), "methodClassName");
            return (Criteria) this;
        }

        public Criteria andCacheReferenceTypeLikeInsensitive(String value) {
            addCriterion("upper(cache_reference_type) like", value.toUpperCase(), "cacheReferenceType");
            return (Criteria) this;
        }

        public Criteria andMethodDescribeLikeInsensitive(String value) {
            addCriterion("upper(method_describe) like", value.toUpperCase(), "methodDescribe");
            return (Criteria) this;
        }

        public Criteria andCaLikeInsensitive(String value) {
            addCriterion("upper(ca) like", value.toUpperCase(), "ca");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}